
      $(document).ready(function() {
        // work with svg
        var injectSVG = document.querySelectorAll('img.svg');
        SVGInjector(injectSVG);
        
        // animated when scrolling
        var animationDelay="0.8s";
        // $('.animated-area').one('inview', function(event, visible) {
        $('.animated-area').one('inview', function(event, visible) {
          var cf = $(this);
          if (visible) {
            cf.find(".animated").each(function() {
              $(this).css("-webkit-animation-delay", animationDelay);
              $(this).css("-moz-animation-delay", animationDelay);
              $(this).css("-ms-animation-delay", animationDelay);
              $(this).css("animation-delay", animationDelay);
              $(this).addClass($(this).attr("data-animation"));
            });
            
            if (cf.attr('id')=='statistic') {
              $('.counter').countTo({
                speed: 2000,
                refreshInterval: 50
              });
            }
          }
        });
        
        // parallax slider
        $('#da-slider').fractionSlider({
          'transitionIn' : 'bottom',
          'transitionOut' : 'right',
          'fullWidth': 			true,
          'controls': 			false, 
          'pager': 				true,
          'responsive': 			true,
          'dimensions': 			"1170,430",
          'increase': 			false,
          'pauseOnHover': 		false,
          'slideEndAnimation': 	true,
          'delay': 2000,
          'timeout': 0
        });
        
        // map action
        $('#btnShowMap').on('click', function() {
          $('footer .region').slideUp();
          $('#btnHideMap').fadeIn();
        });
        $('#btnHideMap').on('click', function() {
          $('footer .region').slideDown();
          $('#btnHideMap').fadeOut();
        });
        
      });

